<html>
<head><meta charset="utf-8"><title>syn::Path · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/syn.3A.3APath.html">syn::Path</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="175738459"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/syn%3A%3APath/near/175738459" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/syn.3A.3APath.html#175738459">(Sep 15 2019 at 07:54)</a>:</h4>
<p>I'm parsing a <code>Option&lt;&amp;u8&gt;</code> as a <code>syn::Type</code>, and this produces a <code>syn::Type::Path</code>. I want to split the <code>Option</code> as an identifier, and iterate over its generic parameters, but I don't see any type that allows me to do that.</p>



<a name="175738466"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/syn%3A%3APath/near/175738466" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/syn.3A.3APath.html#175738466">(Sep 15 2019 at 07:55)</a>:</h4>
<p>What's the idiomatic way ?</p>



<a name="175739669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/syn%3A%3APath/near/175739669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/syn.3A.3APath.html#175739669">(Sep 15 2019 at 08:33)</a>:</h4>
<p>Ah the <code>Path</code> has only one <code>PathSegment</code>, but <code>PathSegment</code>s can have <code>PathArguments</code>, so that's how.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>